bitkeeper revision 1.277 (3f093458V0BnMrGcVZUOCtq7SB5u8w)
authorsos22@labyrinth.cl.cam.ac.uk <sos22@labyrinth.cl.cam.ac.uk>
Mon, 7 Jul 2003 08:50:32 +0000 (08:50 +0000)
committersos22@labyrinth.cl.cam.ac.uk <sos22@labyrinth.cl.cam.ac.uk>
Mon, 7 Jul 2003 08:50:32 +0000 (08:50 +0000)
Oops... we should only add partitions to one disk, not all of them...

xenolinux-2.4.21-sparse/fs/partitions/xeno.c

index 871e20fef9623421ce171717c4bd29ac918c2fa2..2d8f3b9543131fa75b3620253dc8b4098f575981 100644 (file)
@@ -42,6 +42,11 @@ int xeno_partition(struct gendisk *hd,
   for (i = 0; i < buf->n_aces; i++) {
     if ((buf->entries[i].device & 0x1f) == 0)
       continue;
+    /* Make sure the partition is actually supposed to be on this
+       disk.  This assumes that Xen and XenoLinux block device
+       numbers match up. */
+    if ((buf->entries[i].device & ~0x1f) != bdev->bd_dev)
+      continue;
     /* This is a bit of a hack - the partition numbers are specified
        by the hypervisor, and if we want them to match up, this is
        what we need to do. */
@@ -52,5 +57,6 @@ int xeno_partition(struct gendisk *hd,
                     buf->entries[i].n_sectors);
   }
   kfree(buf);
+  printk("\n");
   return 1;
 }